#include "MySqlAlterTableChangeColumn.h"
#include "../../../../../sql/ast/statement/SQLColumnDefinition.h"
#include "../../../../../sql/ast/SQLName.h"
#include "../../../../../sql/dialect/mysql/visitor/MySqlASTVisitor.h"

// @Override
void MySqlAlterTableChangeColumn::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlAlterTableChangeColumn)))
  {
    acceptChild(visitor, columnName);
    acceptChild(visitor, newColumnDefinition);

    acceptChild(visitor, firstColumn);
    acceptChild(visitor, afterColumn);
  }
}

SQLName_ptr MySqlAlterTableChangeColumn::getFirstColumn()
{
  return firstColumn;
}

void MySqlAlterTableChangeColumn::setFirstColumn(SQLName_ptr firstColumn)
{
  this->firstColumn = firstColumn;
}

SQLName_ptr MySqlAlterTableChangeColumn::getAfterColumn()
{
  return afterColumn;
}

void MySqlAlterTableChangeColumn::setAfterColumn(SQLName_ptr afterColumn)
{
  this->afterColumn = afterColumn;
}

SQLName_ptr MySqlAlterTableChangeColumn::getColumnName()
{
  return columnName;
}

void MySqlAlterTableChangeColumn::setColumnName(SQLName_ptr columnName)
{
  this->columnName = columnName;
}

SQLColumnDefinition_ptr MySqlAlterTableChangeColumn::getNewColumnDefinition()
{
  return newColumnDefinition;
}

void MySqlAlterTableChangeColumn::setNewColumnDefinition(SQLColumnDefinition_ptr newColumnDefinition)
{
  this->newColumnDefinition = newColumnDefinition;
}

BOOL_ptr MySqlAlterTableChangeColumn::isFirst()
{
  return first;
}

void MySqlAlterTableChangeColumn::setFirst(BOOL_ptr first)
{
  this->first = first;
}
